import request from '@/utils/request'

// 查询库存列表
export function listStock(query) {
  return request({
    url: '/system/stockinfo/list',
    method: 'get',
    params: query
  })
}

// 查询库存详情
export function getStock(id) {
  return request({
    url: '/system/stockinfo/' + id,
    method: 'get'
  })
}

// 查询库存预警数量
export function getWarningCount() {
  return request({
    url: '/system/stock/warning/count',
    method: 'get'
  })
}

// 查询库存预警列表
export function listWarning(query) {
  return request({
    url: '/system/stock/warning/list',
    method: 'get',
    params: query
  })
}

// 导出库存数据
export function exportStock(query) {
  return request({
    url: '/system/stock/export',
    method: 'get',
    params: query,
    responseType: 'blob'
  })
}

// 获取库存统计数据
export function getStockStats() {
  return request({
    url: '/system/stock/stats',
    method: 'get'
  })
} 